The present invention relates generally to computer applications, and more specifically to installing computer applications at runtime instances.
The Open Services Gateway initiative (OSGi) is a modularity technology for Java™. Within OSGi, a bundle is a unit of modularity. One example of a bundle is a raw artefact of a binary Java jar file with additional bundle metadata that describes the identity and externals of the bundle. Herein, the bundle is referred to as the “bundle resource”, the raw artefact is referred to as the “artefact resource”, and the metadata for the bundle is referred to as the “metadata resource”. Resources are also known as objects.
It is common for software applications to be composed of individual modules. Most application modules, such as Java Enterprise Edition (EE) enterprise archive (EAR) files or OSGi applications, will make use of one or more utility modules which provide reusable functionality. Typically, utility modules are packaged as part of the application module and referenced by the application module using metadata that is also part of the application module. Installation of the application module into an application framework typically involves copying both the application module and utility module to a single directory on a hard disk. Thus, if several different application modules are installed which make use of a common set of utility modules there will be multiple copies of the same utility module stored on the hard disk, and if the application modules are running in the same application framework runtime instance, there might also be several versions of the same utility module loaded into memory. This is obviously wasteful in terms of disk and memory usage, as well as in terms of the time spent loading the utility modules into memory.
A known solution to this problem is to make use of the concept of shared resources, known as shared libraries (for Java Platform, Enterprise Edition or Java EE (JEE) applications) or shared bundles in a common bundle repository (for OSGi applications). Utility modules which are likely to be common to several application modules are extracted from the application modules and installed as a shared library or common bundle in an application framework runtime instance. At application module installation time the application module is linked to the required shared libraries or bundles. As a result of this process, multiple application modules can make use of the same shared resource, even though there is only one copy of the shared resource on disk. Depending on the application framework, there may also only be one version of the shared resource loaded into memory.
The shared resource approach works well when application module developers and application framework administrators can work together, prior to application installation, to decide which utility modules should be made available as common resources. However, if an application module is to be deployed to an application framework that is provided using a platform as a service (PAAS) cloud then it is not possible to plan in advance those resources that can be shared.